package service

import (
	"context"
	v1 "devops-super/api/iotdata/v1"
)

type (
	IIotdata interface {
		GetPageLst(ctx context.Context, req *v1.IotDataGetPageLstReq) (res *v1.IotDataGetPageLstRes, err error)
		SummaryPageLst(ctx context.Context, req *v1.IotDataSummaryPageLstReq) (res *v1.IotDataSummaryPageLstRes, err error)
		GetOne(ctx context.Context, req *v1.IotDataGetOneReq) (res *v1.IotDataGetOneRes, err error)
		Del(ctx context.Context, req *v1.IotDataDelReq) error
		GetOneWave(ctx context.Context, req *v1.IotDataGetOneWaveReq) (res *v1.IotDataGetOneWaveRes, err error)
		GetRealtimeWave(ctx context.Context, req *v1.IotDataGetRealtimeWaveReq) (res *v1.IotDataGetRealtimeWaveRes, err error)
		DelByDistributeTableId(ctx context.Context, distributeId int64) (err error)
		DelByDeviceNo(ctx context.Context, deviceNo string) (err error)
	}
)

var (
	localIotdata IIotdata
)

func Iotdata() IIotdata {
	if localIotdata == nil {
		panic("implement not found for interface IIotdata, forgot register?")
	}
	return localIotdata
}

func RegisterIotdata(i IIotdata) {
	localIotdata = i
}
